<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title></title>
    <link rel="shortcut icon" href="favicon.ico"> 
    <link href="../admin/css/bootstrap.min.css?v=3.3.5" rel="stylesheet">
    <link href="../admin/css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link href="../admin/css/animate.css" rel="stylesheet">
    <link href="../admin/css/style.css?v=4.0.0" rel="stylesheet">
</head>

<body class="gray-bg">

    <div class="wrapper wrapper-content animated fadeInUp">
        <div class="row">
            <div class="col-sm-12">

                <div class="ibox">
                    <div class="ibox-title">
                        <h5>用户</h5>
                        <div class="ibox-tools">
                            <a id="addUser" class="btn btn-primary ">添加</a>
                        </div>
                    </div>
                    <div class="ibox-content">
                        <div class="project-list">
                            <table class="table table-hover">
                                <tbody>
                                    <% list.forEach(function(obj){%>
                                    <tr>
  
                                        <td class="project-title">
                                            <a><%=obj.attributes.username%></a>
                                            <br/>
                                            <small>创建于 <%=obj.createdAt.toLocaleString()%></small>
                                        </td>
                                        
                                        <td class="project-actions">
                               
                                            <a class="btn btn-danger btn-sm" onclick="del('<%=obj.id%>',3)"><i class="fa fa-upload"></i> 删除 </a>
                                     
                                        </td>
                                    </tr>
                                    <%})%>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        
    <!-- 全局js -->
    <script src="../admin/js/jquery.min.js?v=2.1.4"></script>
    <script src="../admin/js/bootstrap.min.js?v=3.3.5"></script>
    
    <!-- layer javascript -->
    <script src="../admin/js/plugins/layer/layer.min.js"></script>

    <!-- 自定义js -->
    <script src="../admin/js/content.js?v=1.0.0"></script>
    <script>





        $('#addUser').click(function(){
           layer.open({
                    type: 2,
                    title: '添加用户',
                    shadeClose: true,
                    shade: false,
                    maxmin: true, //开启最大化最小化按钮
                    area: ['1150px', '650px'],
                    content: './userAdd',
                    end:function(){
                        window.location.reload();//刷新当前页面.
                    }
                });
        })
    </script>
    
    </body>
</html>


